package com.example.com.skills_utf8;

import android.app.Activity;
import android.app.Fragment;
import android.content.Intent;
import android.os.Bundle;
import android.view.View;
import android.widget.Button;


public class _64Activity extends Activity implements View.OnClickListener{

    _64Activity activity = this;

    Button btn_progress ;


    @Override
    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.activity__64);


        init();




    }





    void init(){

        Button btn_progress = (Button)findViewById(R.id.btn_progress);
        Button btn_progress_rota = (Button)findViewById(R.id.btn_progress_rota);
        Button btn_bitmap_paint = (Button)findViewById(R.id.btn_bitmap_paint);
        Button btn_foucs_framebox = (Button)findViewById(R.id.btn_foucs_framebox);
        Button btn_foucs_dest = (Button)findViewById(R.id.btn_foucs_dest);
        Button btn_i = (Button)findViewById(R.id.btn_i);
        Button btn_64_6 = (Button)findViewById(R.id.btn_64_6);
        btn_progress.setOnClickListener(this);
        btn_progress_rota.setOnClickListener(this);
        btn_bitmap_paint.setOnClickListener(this);
        btn_foucs_framebox.setOnClickListener(this);
        btn_foucs_dest.setOnClickListener(this);
        btn_i.setOnClickListener(this);
        btn_64_6.setOnClickListener(this);


        ApplicationCustom.getInstance().location.OnStop();

    }



    @Override
    public void onClick(View v) {
        // TODO Auto-generated method stub

        Fragment fragment = null;

        switch(v.getId()){

            case R.id.btn_progress:
                fragment = new _64Fragment();
                break;

            case R.id.btn_progress_rota:
                fragment = new _64_1Fragment();
                break;

            case R.id.btn_bitmap_paint:
                fragment = new _64_2Fragment();
                break;

            case R.id.btn_foucs_framebox:
                fragment = new _64_3Fragment();
                break;

            case R.id.btn_foucs_dest:
                fragment = new _64_4Fragment2();
                break;

            case R.id.btn_i:
                fragment = new _64_5Fragment();
                break;

            case R.id.btn_64_6:
                startActivity(new Intent(activity, _64_6Activity.class));
                return;

        }

        if(fragment != null){
            android.app.FragmentTransaction transaction = getFragmentManager().beginTransaction();
            transaction.replace(R.id.layout_content, fragment);
            transaction.commit();
        }



    }


}
